#!/bin/sh

PIVERSION=`cat /etc/hifiberry.state | grep PIVERSION | awk -F= '{print $2}'`
if [ "$PIVERSION" == "4" ]; then
 # Use different DMA channels on Pi 4 to make sure there are no conflicts with I2S and SPI
 /bin/pigpiod -t 0 -g -x 0xFC3FFFC -d 11 -e 10
else
 # On older Pi's no DMA tuning is needed, defaults are fine
 /bin/pigpiod -t 0 -g -x 0xFC3FFFC 
fi
